package com.spring.boot.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@ToString
@Data
@NoArgsConstructor // 无参构造器
@AllArgsConstructor // 全参构造器
public class User {
  private String name;

  private Integer age;

  private Pet pet;

  public User(String name) {
    this.name = name;
  }

  public User(String name, Integer age) {
    this.name = name;
    this.age = age;
  }
}
